package com.ls.ls_web.controller;

import com.ls.entity.User;
import com.ls.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @program: ls_starter
 * @author: lishun
 * @create: 2021-05-31 23:30
 **/
@Controller
public class UserController {
//    @Autowired
    private UserService userService;

    @ResponseBody
    @RequestMapping("/users")
    public List<User> users(){
        return userService.getuser();
    }
}
